﻿import torch
import torch.nn as nn
import matplotlib.pyplot as plt
import random
   
# 定义扑克牌的花色和点数   
suits = ['♠', '♥', '♦', '♣']   
ranks = ['2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K', 'A']
   
# 生成一副扑克牌   
def generate_deck():
    deck = []
    for suit in suits:
        for rank in ranks:
            card = rank + suit
            deck.append(card)
    return deck
   
# 洗牌   
def shuffle_deck(deck):
    random.shuffle(deck)
    return deck
   
# 示例用法   
deck = generate_deck()   
shuffled_deck = shuffle_deck(deck)   
print(shuffled_deck)
